package com.heima;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

@Component
public class HelloListener {
    @KafkaListener(topics = "topic")
    public void listen(String message) {
        if(message!=null){
            System.out.println(message);
        }
    }
}
